<%@ include file="base.jsp" %>

<html>
<head>
	<SCRIPT LANGUAGE="JavaScript">
	<!--
		javascript:window.history.forward(1);
		
		function change_bg(cell)
		{
			cell.className="cell-mouseover";
			document.getElementById(cell).style.backgroundImage ='url(' + "<%=imagePath%>/left-menu-middle-grey.gif" + ')';
		}
		function outset(cell)
		{
			cell.className ="white-smalltext";
			document.getElementById(cell).style.backgroundImage ='url(' +"<%=imagePath%>/left-menu-middle.gif" +')';
		}
		function enableData(val)
		{
			if (val == "Upload Image")
			{
				document.BannerUploadForm.theFile.disabled = false;
				document.BannerUploadForm.link.disabled = true;
			}
			else
			{
				document.BannerUploadForm.link.disabled = false;
				document.BannerUploadForm.theFile.disabled = true;
			}
		}
		function setAction(clickAction)
		{
			document.BannerUploadForm.action.value = clickAction;
			document.BannerUploadForm.submit();
		}
	//-->
	</SCRIPT>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title><bean:message key="ibroker.changeAdBanner.title" /></title>
<link rel="stylesheet" type="text/css" href="<%=oStylesheet%>" />
</head>

<body>
<table cellspacing=25 border=0 cellpadding=0>
		<%@ include file="leftMenu.jsp" %>
		<td width=290 valign=top>
		<table>
			<tr>
			<td valign="top">
			<table cellpadding="0" cellspacing="0" width="100%" height="100%">
				<tr height="45px">
					<td height="45px" width="10px" bgcolor="#999999"><img src="<%=imagePath%>/grey-square.gif"></td>
					<td height="45px" bgcolor="#999999" align="left" valign="middle">
						<table cellpadding="0" cellspacing="0">
							<tr>
								<td width="190" align="left">								
									<img src="<%=imagePath%>/title_manager_change_banner.gif" align="left"/>
								</td>
								<td width="60" align="right">
									<html:link action="Logout">
										<img src="<%=imagePath%>/button-logout.jpg" border="0" align="right"/>
									</html:link>
								</td>
							</tr>
						</table>
					</td>
					<td height="45px" width="10px" bgcolor="#999999"><img src="<%=imagePath%>/grey-square.gif"></td>
				</tr>
				<tr height="182px">
					<td width="10px" bgcolor="#999999"><img src="<%=imagePath%>/grey-square.gif"></td>
					<td bgcolor="#CCCCCC" width="270px">
						<table>
							<tr>
								<td align="left" colspan="4" class="blue-smalltext"><b><html:errors/></b></td>
							</tr>
							<tr>
								<td align="left" colspan="4">
								<b class="blue-smalltext"><bean:message key="ibroker.changeAdBanner.text" /><bean:message key="ibroker.adBanner.image.formats" /></b>
							</tr>
							<tr>
								<td align="center" colspan="2">
								<font size="4">&nbsp;</font>
							</tr>
							<TR>
								<html:form action="/BannerUploadForm" method="post" enctype="multipart/form-data">
							</TR>
							<tr>
								<td align="left" colspan="4">
									<input type=radio name=banner value="Upload Image" onclick="enableData(this.value);" />
									<b class="blue-smalltext"><bean:message key="ibroker.changeAdBanner.file" /></b>
								</td>
							</tr>
							<tr>
								<td align="left" colspan="4">
								<html:file property="theFile" disabled="true" /> 
								</td>
							</tr>
							<tr>
								<td align="center" colspan="3">
								<font size="4">&nbsp;</font>
							</tr>
							<tr>
								<td align="left" colspan="4">
									<input type=radio name=banner value="Upload Link" onclick="enableData(this.value);" />
									<b class="blue-smalltext"><bean:message key="ibroker.changeAdBanner.link" /></b>
								</td>
							</tr>
							<tr>
								<td align="left" colspan="4">
								<html:text property="link" size="30" disabled="true" /> 
								</td>
							</tr>
							<tr>
								<td align="center" colspan="2">
								<font size="4">&nbsp;</font>
							</tr>
							<tr>
								<td align="right" colspan="1">
								&nbsp;<html:hidden property="action"></html:hidden>					
								</td>
								<td align="left" colspan="1">
								<img src="<%=imagePath%>/button-submit.jpg" onclick="setAction('upload');"></img>
								</td>
								<td align="left" colspan="1">
								<img src="<%=imagePath%>/button-cancel.jpg" onclick="setAction('cancel');"></img>
								</td>
								</html:form>
							</tr>
							<tr height="50px">
								<td align="center" colspan="2">
								<font size="4">&nbsp;</font>
							</tr>
						</table>
					</td>
					<td width="10px" bgcolor="#999999"><img src="<%=imagePath%>/grey-square.gif"></td>
				</tr>
				<tr height="10px">
					<td colspan="3" bgcolor="#999999"></td>
				</tr>
			</table>
			</td>
			</tr>
		</table>
		</td>
		<%@ include file="bottom.jsp" %>
</table>
</body>
</html>
